package com.site.dao;

import com.site.pojo.ReceiveDetail;

import java.sql.Connection;
import java.util.List;

/**
 * 入库明细表类Dao层
 */
public interface ReceiveDetailDao {
    //查询所有
    List<ReceiveDetail> selectAll();

    //按id查询
    ReceiveDetail selectByid(Long id);

    //查询一个入库单下所属的入库明细单
    List<ReceiveDetail> selectByrid(Long rid);

    //无事务，新增一个入库明细单
    int addReceiveDetail(ReceiveDetail receiveDetail);

    //有事务，新增一个入库明细单
    int addReceiveDetail(Connection conn, ReceiveDetail receiveDetail);

    //无事务，通过id删除入库明细单
    int deleteReceiveDetailByid(Long id);

    //有事务，通过id删除入库明细单
    int deleteReceiveDetailByid(Connection conn,Long id);

    //无事务，,通过receiveDetail.id修改入库明细单
    int updateReceiveDetail(ReceiveDetail receiveDetail);

    //有事务，,通过receiveDetail.id修改入库明细单
    int updateReceiveDetail(Connection conn,ReceiveDetail receiveDetail);
}
